#!/usr/bin/env bash

if [ $# = 0 -o $# -gt 2 ]; then
    echo -e '
Usage: dc-log ctnName [keyword]
'
    exit 1
fi

if [ $# = 1 ]; then
    docker logs -f --tail 100 $1
else
    docker logs $1 |  grep --color=auto -i $2
fi